package com.vic.dubbo.huisheng;

import com.alibaba.dubbo.rpc.service.EchoService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class APP {
    public static void main(String[] args) throws InterruptedException {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
                "dubbo.xml");
        context.start();

        HelloWordService helloWord = (HelloWordService) context.getBean("helloWord");

        EchoService echo = (EchoService) helloWord;
        System.out.println(echo.$echo("OK"));

        Thread.sleep(2000000l);




    }
}
